﻿using SH;
using System;
using System.Collections.Generic;
using System.Text;

namespace MTS
{
    internal class mtCSSServer : mtInterface, ImtCSSServer
    {
        public mtCSSServer()
           : base("mtCSSServer")
        {

        }

        public shErrorCode NotifyStorageComplete(mtStorageComplete info)
        {
            MTSSerializer sc1 = new MTSSerializer();

            sc1.serialize(info);

            var ec = __InvokeOneWay(ImtSMSServerCallback._classID, ImtSMSServerCallback.SMSServerStorageComplete, sc1);

            MTSSerializer sc2 = new MTSSerializer();

            sc2.serialize(info);
            ec = __InvokeOneWay(ImtIPSServerCallback._classID, ImtIPSServerCallback.ImtIPSServerStorageComplete, sc2);

            return shErrorCode.sh_ec_Success;
        }

        public shErrorCode NotifySaveImageResult(mtSaveImageResult info)
        {
            MTSSerializer sc = new MTSSerializer();

            sc.serialize(info);

            var ec = __InvokeOneWay(ImtSMSServerCallback._classID, ImtSMSServerCallback.SMSServerSaveImageResult, sc);


            return (shErrorCode)ec;
        }

        public shErrorCode NotifyDeleteImageResult(mtDeleteImageResult info)
        {
            MTSSerializer sc = new MTSSerializer();

            sc.serialize(info);

            var ec = __InvokeOneWay(ImtSMSServerCallback._classID, ImtSMSServerCallback.SMSServerDeleteImageResult, sc);


            return (shErrorCode)ec;
        }
     
    }
}
